<?php


namespace app\admin\validate;


use think\Validate;

class VideoCategory extends Validate
{
    // 验证规则
    protected $rule = [
        'name' => 'require|unique:video_category',
        'sort' => 'require|number',
    ];
    //错误信息
    protected $message = [
        'name.require' => '请输入分类名称',
        'name.unique' => '分类名称已存在',
        'sort.require' => '请输入排序',
        'sort.number' => '排序只能为数字',
    ];
}